package org.bambrikii.dictionary.dao;

import org.bambrikii.dictionary.Word;
import org.bambrikii.site.base.core.dao.DAOBase;
import org.bambrikii.site.base.persistence.PersistenceConnector;
import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

public class WordDAO extends DAOBase<Word> implements IWordDAO {
	public WordDAO(final PersistenceConnector connector) {
		super(connector);
	}

	public Word find(final String value) {
		final Criteria crit = getCriteria();
		crit.add(Restrictions.eq("value", value));
		return (Word) crit.uniqueResult();
	}
}
